-- GENERATED SPELL FOR [Fallen Spiderlord] --


function spell0_31780(pUnit, Event) --@Blinding Swarm,Self--
pUnit:FullCastSpellOnTarget(50284,pUnit)
pUnit:RegisterEvent('Sorts_31780', 5000, 1)
end

function spell1_31780(pUnit, Event) --@Mandible Crush,Self--
pUnit:FullCastSpellOnTarget(60802,pUnit)
pUnit:RegisterEvent('Sorts_31780', 670, 1)
end

function Sorts_31780(pUnit, Event)
local choix_sorts_31780 = math.random(0, 1)
if choix_sorts_31780 == 0 then
pUnit:RegisterEvent('spell0_31780', 1, 1)
end
if choix_sorts_31780 == 1 then
pUnit:RegisterEvent('spell1_31780', 1, 1)
end
end

function mob31780_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31780', math.random(1500, 3000), 1)
end

function mob31780_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31780_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31780_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31780, 1, 'mob31780_Action')
RegisterUnitEvent(31780, 2, 'mob31780_Leave')
RegisterUnitEvent(31780, 3, 'mob31780_Kill')
RegisterUnitEvent(31780, 4, 'mob31780_Die')
